AltF Flow recipe
Decode Base64 and pretty print JSON
To read JSON that arrives Base64-encoded, decode it to text and then format it. This recipe ignores line breaks and spaces in the encoded string, accepts both standard Base64 and the URL-safe - and _ variant, decodes the bytes as UTF-8 and pretty prints the JSON with two-space indentation. If the decoded text is not JSON, the second step stops with an error.
- Free, no sign-up
- Runs in your browser
- Nothing uploaded
- Share recipes as a link
2 steps · runs in your browser · nothing uploaded
Pipeline
Base64 decode
5 → 1 lines (-4)Pretty-print JSON with indentation, optionally sorting keys.
1 → 21 lines (+20)
5lines5words284chars
21lines35words333chars+16 lines vs input
The 2 steps in this recipe
- 1
Encode or decode - Base64 decode
URL, Base64, HTML entity and JSON string encoding, both directions.
- 2
Format JSON
Pretty-print JSON with indentation, optionally sorting keys.
Change any option in the workspace above, switch a step off to compare, or add your own steps. Save it to reuse it, or share the recipe as a link.
Worked example
eyJldmVudCI6Im9yZGVyLmNyZWF0ZWQiLCJpZCI6ImV2dF8wMDAxIiwiZGF0 YSI6eyJvcmRlcl9pZCI6IkEtMTA0MiIsImN1c3RvbWVyIjoiVGVzdCBDdXN0 b21lciIsIml0ZW1zIjpbeyJza3UiOiJTS1UtUkVELTAxIiwicXR5IjoyfSx7 InNrdSI6IlNLVS1CTFUtMDciLCJxdHkiOjF9XSwidG90YWwiOjQ4LjUsImN1 cnJlbmN5IjoiVVNEIn0sInNhbmRib3giOnRydWV9
{
"event": "order.created",
"id": "evt_0001",
"data": {
"order_id": "A-1042",
"customer": "Test Customer",
"items": [
{
"sku": "SKU-RED-01",
"qty": 2
},
{
"sku": "SKU-BLU-07",
"qty": 1
}
],
"total": 48.5,
"currency": "USD"
},
"sandbox": true
}Why two steps
Decoding gives you the JSON as one long line. Formatting it adds indentation and line breaks so nested objects and arrays are readable. Keeping them as separate steps also tells you where a problem is: an error on step 1 means the Base64 is broken, an error on step 2 means the decoded text is not valid JSON.
Variations
- Turn on Sort keys A-Z in the format step to compare two payloads field by field.
- Add Minify JSON instead of Format JSON to get compact output for a test fixture.
- For a JWT, paste only the middle segment between the dots; signatures are not verified.
Base64 to pretty JSON: questions and answers
Does it handle Base64url without padding?
Yes. - and _ are mapped back to + and /, and missing = padding is accepted.
What if the payload is not JSON?
The run stops at step 2 and the output shows the decoded text from step 1, so you can still read it.
Is the payload sent anywhere?
No. Decoding happens in your browser, which matters when payloads contain customer data or tokens.
More recipes like this
Developers and data
- Trim every line
- Remove empty lines
- Remove duplicate lines
- Quote each line
- +2 more
- Trim whitespace
- Remove empty lines
- Trim every line
- Find and replace
- +1 more
- Format JSON
- JSON to CSV
- Filter lines
- Find and replace
- Find and replace
- Remove duplicate lines
- Trim whitespace
- Remove empty lines
- Wrap at a width
Every step you can add (41)
Clean up
- Trim whitespace
- Trim every line
- Remove empty lines
- Collapse repeated spaces
- Remove line breaks
- Strip HTML tags
- Straighten smart quotes
- Remove accents
- Remove punctuation
- Remove emoji
- Remove non-ASCII characters
Change case
- Change case
- Make URL slugs
Lines
- Sort lines
- Remove duplicate lines
- Keep only duplicated lines
- Compare with another list
- Count repeated lines
- Reverse line order
- Shuffle lines
- Keep a range of lines
- Truncate long lines
- Wrap at a width
- Split into lines
- Join lines
Find and filter
- Find and replace
- Filter lines
- Remove words or characters
Extract
- Extract
Data and formats
- Format JSON
- Minify JSON
- CSV to JSON
- JSON to CSV
- Lines to JSON array
- JSON array to lines
Encode and decode
- Encode or decode
Build output
- Add prefix / suffix
- Quote each line
- Number lines
- Apply a line template
- Add timestamp
AltF Flow runs entirely in your browser. Your text is never sent to AltFTool; saved recipes stay in this browser and shared links carry the steps only.