Base64 JSON Decoder & Formatter

Read a JSON document transported as Base64 and format its object structure. The first step recovers the JSON bytes and the second applies indentation.

Input: Base64 textResult: Formatted JSON text

Text input

Run to see the result

Examples

A support ticket with a zero-prefixed identifier

Input

eyJ0aWNrZXQiOiIwMDEyMyIsInByaW9yaXR5IjoiaGlnaCJ9

Expected answer

JSON
{
    "ticket": "00123",
    "priority": "high"
}
An observatory reading with a negative temperature

Input

eyJzdGF0aW9uIjoiZGVtby1vYnNlcnZhdG9yeSIsInRlbXBlcmF0dXJlQyI6LTEyLjUsIm9wZW4iOmZhbHNlfQ==

Expected answer

JSON
{
    "station": "demo-observatory",
    "temperatureC": -12.5,
    "open": false
}
A café menu with Unicode and a decimal price

Input

eyJpdGVtIjoiY2Fmw6kiLCJwcmljZSI6My41LCJjdXJyZW5jeSI6IkVVUiJ9

Expected answer

JSON
{
    "item": "café",
    "price": 3.5,
    "currency": "EUR"
}
A safe webhook retry policy

Input

eyJ0aW1lb3V0TXMiOjUwMDAsInJldHJpZXMiOjIsImVuYWJsZWQiOnRydWV9

Expected answer

JSON
{
    "timeoutMs": 5000,
    "retries": 2,
    "enabled": true
}
An image manifest with a null caption

Input

eyJ3aWR0aCI6NjQwLCJoZWlnaHQiOjQ4MCwiY2FwdGlvbiI6bnVsbH0=

Expected answer

JSON
{
    "width": 640,
    "height": 480,
    "caption": null
}
A release note with an embedded newline

Input

eyJ2ZXJzaW9uIjoiMi4xLjAiLCJub3RlcyI6IkZpeGVkIHBhcnNlclxuQWRkZWQgdGVzdHMifQ==

Expected answer

JSON
{
    "version": "2.1.0",
    "notes": "Fixed parser\nAdded tests"
}
An empty search result

Input

eyJyZXN1bHRzIjpbXSwidG90YWwiOjB9

Expected answer

JSON
{
    "results": [],
    "total": 0
}

How the result is produced

  1. Base64 Decoder
  2. JSON Formatter

Conventions and limitations

Formatting does not validate a schema or verify authenticity. Very large JSON documents require enough browser memory. Do not use formatted output for signatures that depend on exact original bytes.

Related tools

Browse code tidy tools