Code and data

JSON Stringify

Turn JSON into an escaped string literal, and back.

  • Free
  • Runs in your browser: nothing is sent
  • API: 120 runs a minute without an account
  • No sign-up

TryA JSON valueAn escaped string

About JSON Stringify

Convert a JSON document into a single escaped string, the form you need when embedding JSON inside another JSON value, an environment variable or a source file. The reverse mode takes an escaped string and gives the JSON back.

  • Escapes quotes, backslashes and newlines correctly
  • Reverse mode parses a quoted, escaped string back into JSON
  • Runs in your browser
Questions · 1

When do I need this?

Whenever JSON has to travel inside a string: a JSON field that holds JSON, a config value, a test fixture or a shell variable.

Use it from code · API

Input: text, mode. No account needed within the free limit; a token with tools.tool.run raises it.

curl -X POST https://openvibe.tools/api/v1/tools/jsonstringify/run \
  -H 'Content-Type: application/json' \
  -d '{"input":{"text":"{\"a\":\"b\"}"}}'

JSON Schema · OpenAPI · API docs