PrettifyPrettify
DocsHome
Getting started
  • Getting started
Formats
  • JSON
  • JSONL and NDJSON
  • YAML
  • CSV and TSV
  • XML
  • RSS and Atom feeds
  • Mermaid
  • Markdown
  • MDX
  • HTML
  • SVG
Views
  • Views overview
  • Diagram view
  • Chart view
Queries
  • jq queries
  • SQL queries
  • XPath queries
Editing tools
  • Search and replace
  • Format conversion
  • Transforms
  • Type generation
  • JSON Schema validation
  • Diff and compare
  • Split view
Your documents
  • Tabs
  • History and versions
  • Sharing
  • Privacy and your data
Desktop app
  • Desktop app
  • Keyboard shortcuts
Pro
  • Prettify Pro
Help
  • Troubleshooting

Docs / Editing tools

Search and replace

Last updated: October 16, 2026

Search and replace finds text in the open document and changes it. It works in the Tree, Table, and Raw views, with plain text or a regular expression. Search and replace is free in Prettify.

Open the search bar

Load a document first. Search is available once data is present.

  • Press Cmd+F (Mac) / Ctrl+F (Windows, Linux) to open search.
  • Press Cmd+H (Mac) / Ctrl+H (Windows, Linux) to open search with the replace row expanded. On the Mac desktop app, Cmd+H hides the app, so press Cmd+Option+F there.
  • Click the chevron at the left of the search bar to show or hide the replace row.
  • Press Esc to close the search bar.

The bar shows the active match and the total count, for example 3/12. It shows No results when nothing matches.

Set search options

Two toggles sit next to the search field.

ToggleButtonWhat it does
Case sensitiveAaMatch the exact letter case. Off by default.
Regex.*Read the query as a JavaScript regular expression.

In regex mode, Prettify uses standard JavaScript regular expression syntax. An invalid expression matches nothing until you fix it.

"email":\s*"[^"]+@[^"]+"

Move between matches

Type a query, then step through the results.

  • Press Enter to go to the next match.
  • Press Shift+Enter to go to the previous match.
  • Click the up and down arrows to do the same.

Search highlights every match in the current view and scrolls the active match into view.

Replace text

Open the replace row, then type a replacement.

  1. Type the text to find in the search field.
  2. Type the new text in the replace field.
  3. Press Enter, or click the Replace button, to replace the active match.
  4. Press Shift+Enter, or click Replace All, to replace every match.

The Replace All button shows the number of matches it will change.

Replace edits the document text, so it runs the same way in every view. In regex mode, the replacement can use $1 for a capture group.

Prettify checks the result before it applies a replacement. If the change would make the document invalid, Prettify keeps the document and shows the message Replace would break format.

Search in each view

Search runs against the view you are in.

  • Tree view matches keys and values.
  • Table view matches cell values and column names, and highlights the matching rows.
  • Raw view matches whole lines.

The match count can differ between views because each view counts different units: nodes, rows, or lines.

Keep a search in the URL

The left pane stores the search state in the page URL, so you can share or bookmark a search. These query parameters control it.

ParameterMeaning
qThe search text.
regextrue turns on regex mode.
cstrue turns on case sensitivity.
siThe index of the active match.

Related

  • Views: Tree, Table, Raw, and More
  • jq queries for structural filters on JSON
  • Keyboard shortcuts

Try it online

Tool pages for this topic. Each one runs in your browser.

  • JSON Editor
  • How to Edit JSON
PreviousXPath queriesNext Format conversion
On this page
  • Open the search bar
  • Set search options
  • Move between matches
  • Replace text
  • Search in each view
  • Keep a search in the URL
  • Related
Prettify·Home·All docs·Contact·Changelog·Open app·llms.txtPermalink