JSON escape / unescape

Turn text into a JSON string literal (JSON.stringify) or decode a quoted JSON string.

{{ jsonStringEscape.message }}

Overview

Useful when embedding text in JSON files or payloads without breaking syntax (quotes, newlines, slashes).

Tool guide

  • O que é string JSON Em JSON, texto fica entre aspas duplas; caracteres especiais usam sequências como \n, \", \\.
  • O que a ferramenta faz Modo “escape”: transforma texto puro no literal que você colaria dentro de um JSON. Modo inverso: lê um literal JSON entre aspas e devolve o texto.
  • Por que usar Montar arquivos JSON à mão, corrigir payloads e evitar erros de sintaxe por quebras de linha ou aspas.

Escape

linha1\n"aspas" → "linha1\\n\"aspas\""

FAQ

What is this tool for?

It runs fully in your browser: useful to validate, format, or convert data in everyday development.

Are my inputs sent to a server?

Processing happens locally with JavaScript. We do not store what you paste into the text areas.

Can I use this for real production data?

Use at your own risk. For secrets (passwords, tokens), prefer controlled environments and your company policies. And always review the generated contents. Never trust blindly things you see on the internet.