jsonecho

Escapar JSON

Prepara texto para insertarlo de forma segura en una cadena JSON.

Cargando la herramienta...

Cómo usar Escapar JSON

  1. Pega el texto.
  2. Copia el resultado.

Sobre Escapar JSON

Cuando un valor de cadena en JSON contiene comillas o caracteres especiales, hay que escaparlos. Esta herramienta lo hace.

What gets escaped

Double quote becomes \", backslash \\, line break \n, carriage return \r, tab \t, backspace \b, form feed \f; other control characters become \u00XX.

Preguntas frecuentes

Is the forward slash escaped?

No. JSON allows \/ but does not require it. Skipping it keeps the text shorter and easier to read.

Are single quotes escaped?

No. JSON strings only use double quotes, so a single quote needs no escape.

Do non-ASCII characters have to be escaped?

No, JSON is UTF-8 and handles any character. The option exists for systems that want pure ASCII on the wire.

How do I handle emoji?

Without the option they stay as they are. With it, they become a surrogate pair such as \ud83d\ude00, which is how JSON writes characters outside the BMP.

Más en Escape y texto

Todas las herramientas →