Voltar aos serviços

Editor SVG online

Edite código SVG no navegador com pré-visualização em tempo real e download.

O arquivo é processado localmente no navegador • sem envio ao servidor • baixe o SVG pronto.

Pré-visualização

Sem arquivo
Envie um SVG Após o envio, a imagem aparecerá aqui e será atualizada ao editar o código.
Tamanho: — Arquivo: —

Código SVG

Живое обновление
0 caracteres As alterações são aplicadas automaticamente

Sobre esta ferramenta — Editor SVG online

Edite código SVG no navegador com pré-visualização em tempo real e download.

Envie um SVG ou cole o código XML, altere cores, dimensões, textos, linhas e outros parâmetros, veja o resultado na hora e salve o SVG pronto. A ferramenta funciona diretamente na página do DEVNEW.ORG e não exige a instalação de software adicional. É útil para proprietários de sites, desenvolvedores, especialistas em SEO, designers e qualquer pessoa que precise de um utilitário online rápido. Use gratuitamente em tarefas profissionais ou pessoais.

Veja também

'; empty.style.display = 'none'; frame.style.display = 'block'; setStatusOk(); updateMeta(result.root, source); } function parseAndSanitize(source) { try { const parser = new DOMParser(); const doc = parser.parseFromString(source, 'image/svg+xml'); const parseError = doc.querySelector('parsererror'); if (parseError) { return { ok: false, error: 'O código SVG contém um erro de sintaxe.' }; } const root = doc.documentElement; if (!root || root.nodeName.toLowerCase() !== 'svg') { return { ok: false, error: 'O código deve conter um elemento raiz .' }; } sanitizeSvg(root); return { ok: true, root: root, svg: new XMLSerializer().serializeToString(root) }; } catch (e) { return { ok: false, error: 'Não foi possível analisar o código SVG.' }; } } function sanitizeSvg(root) { const blockedTags = [ 'script', 'foreignObject', 'iframe', 'object', 'embed', 'audio', 'video' ]; blockedTags.forEach(function (tag) { root.querySelectorAll(tag).forEach(function (node) { node.remove(); }); }); root.querySelectorAll('*').forEach(function (node) { Array.from(node.attributes).forEach(function (attr) { const name = attr.name.toLowerCase(); const value = String(attr.value || '').trim().toLowerCase(); if (name.startsWith('on')) { node.removeAttribute(attr.name); return; } if ( (name === 'href' || name === 'xlink:href') && ( value.startsWith('javascript:') || value.startsWith('http://') || value.startsWith('https://') || value.startsWith('//') ) ) { node.removeAttribute(attr.name); } }); }); } function updateMeta(root, source) { let width = root.getAttribute('width') || ''; let height = root.getAttribute('height') || ''; const viewBox = root.getAttribute('viewBox') || ''; if ((!width || !height) && viewBox) { const values = viewBox.trim().split(/\s+/); if (values.length === 4) { if (!width) width = values[2]; if (!height) height = values[3]; } } dimensions.textContent = 'Tamanho: ' + (width && height ? width + ' × ' + height : 'não especificado'); const bytes = new Blob([source]).size; fileSize.textContent = 'Файл: ' + formatBytes(bytes); } function clearPreview() { frame.srcdoc = ''; frame.style.display = 'none'; empty.style.display = 'block'; status.className = 'svg-status'; status.innerHTML = ' Sem arquivo'; dimensions.textContent = 'Tamanho: —'; fileSize.textContent = 'Arquivo: —'; chars.textContent = code.value.length + ' caracteres'; hideError(); } function setStatusOk() { status.className = 'svg-status ok'; status.innerHTML = ' SVG válido'; } function setStatusError() { status.className = 'svg-status error'; status.innerHTML = ' Ошибка кода'; } function showError(message) { errorBox.textContent = message; errorBox.style.display = 'block'; } function hideError() { errorBox.textContent = ''; errorBox.style.display = 'none'; } function formatBytes(bytes) { if (bytes >= 1024 * 1024) { return (bytes / 1024 / 1024).toFixed(2) + ' MB'; } if (bytes >= 1024) { return (bytes / 1024).toFixed(2) + ' KB'; } return bytes + ' Б'; } function prettyXml(xml) { xml = xml.replace(/>\s*<'); const nodes = xml.replace(//.test(trimmed)) { pad = Math.max(0, pad - 1); } out += ' '.repeat(pad) + trimmed + '\n'; if ( /^<[^!?/][^>]*[^/]?>$/.test(trimmed) && !/^<(path|circle|rect|line|polyline|polygon|ellipse|use|image|stop|br)\b/i.test(trimmed) && !trimmed.includes('