Most tools act on the current selection, or on the whole pad when nothing is selected, and show a preview before changing anything.
The Review Changes window
Transformations, described changes, macro replays, Replace All, version restores and snippets open a Review Changes sheet:
- A summary and the exact commands that will run (with their patterns and replacements).
- Counts: lines before → after · characters before → afteror for highlight macros, N matches to highlight.
- Original and Result columns, read-only, with changes highlighted. Click the lock between them to synchronize scrolling in either direction; click again to scroll independently. Synchronization follows relative position when the two texts have different lengths.
- Cancel (Esc), closes without changing anything.
- Save Macro…: saves the commands as a reusable macro (only when the preview has commands).
- Apply Changes (↩), replaces the text as one undoable edit. It reads Apply Highlights for highlight-only macros, and is disabled when nothing would change.
If the pad changed meanwhileApplying is refused with The document changed. Generate a new preview before applying. Run the tool again. Previews also can’t be applied while the pad is read-only.
Text submenu
| Item | What it does |
| Trim Whitespace… | Removes leading and trailing whitespace on each line. |
| Sort Lines… | Sorts lines in ascending order. |
| Remove Duplicate Lines… | Keeps the first occurrence of each line. |
| UPPERCASE… · lowercase… | Changes case. |
| Keep Matching Lines… | Asks for a PCRE2 pattern and keeps only lines that match. |
| Delete Matching Lines… | Removes lines that match a pattern. |
| Extract Matches… | Replaces the text with just the matches of a pattern. |
| Replace with Regex… | Asks for a pattern and replacement together ($1, ${name}). |
| Replace Text… | Literal find and replace; symbols such as *, $1 and backslashes are not interpreted. |
| Split into Lines… | Splits at a literal separator (required). |
| Join Lines… | Joins lines with a literal separator (empty uses one space). |
| Format JSON… | Re-indents valid JSON. Numbers, key order and strings are preserved. |
| Clean Up Escaped JSON… | Decodes JSON that’s wrapped in string quotes (up to 8 layers) and formats it. See JSON tools. |
| Format SQL… | Asks for a dialect - sql, postgresql, mysql, sqlite or tsql - and reformats layout. It never runs SQL. |
| Indent… · Unindent… | Shifts lines by the indent width. |
| Remove Blank Lines… | Deletes empty lines. |
| Toggle Line Comment… | Uses the active syntax language’s line marker. HTML and CSS use safe block wrappers; lines containing a conflicting closing delimiter are rejected without changes. |
| Compare with File… | Opens a comparison window between this pad and a file. |
| Compare Two Open Tabs… | Choose a left and right pad (unsaved pads included) and compare them read-only. |
Whole-pad Format JSON, Clean Up Escaped JSON and Format SQL also switch the pad’s language to JSON or SQL. Plain text and JSON have no assumed comment syntax, so choose a supported language before using Comment or Uncomment.
Tables submenu
| Item | What it does |
| Extract CSV Columns… | Keeps the columns you list as a JSON array of zero-based indexes, e.g. [0,2]. Columns can be reordered or repeated. Rows missing a column are rejected. |
| Filter CSV Rows… | Keeps rows where a zero-based column equals or contains a literal value (case-sensitive). A header row is treated as data. |
| Group CSV Rows… | Groups rows by a zero-based column into a JSON object. |
| JSON5 Subset to JSON… | Converts a supported subset of JSON5 to strict JSON. |
| Python Literal Subset to JSON… | Converts supported Python literals (dicts, lists, strings, numbers) to JSON. |
| CSV to TSV… · TSV to CSV… | Converts delimiters, quoting as needed. |
| CSV to JSON Rows… | Converts rows to a JSON array of string arrays. |
| JSON String Rows to CSV… | Converts a JSON array of string rows to CSV. |
All values are kept as strings, so IDs with leading zeros survive. Actions › Data › Table Tools… offers the conversions that fit the current text.
Pasted data detection
When you paste up to 256 KiB of JSON, CSV or TSV, ZapPad checks it in the background without changing it. A button such as JSON Detected - Tools… appears above the editor, offering Preview JSON Cleanup…, Preview CSV to JSON… or Preview TSV to CSV…. For JSON, the status line also says whether the syntax is valid or string-wrapped. Turn off View›Detect Pasted Code to stop automatic language detection on paste.
Code submenu
| Item | What it does |
| Check JSON Syntax… | Validates the selection or pad and reports in the status line (JSON syntax is valid. Text unchanged.) or shows the error with line and column. |
| Parameter Hints… | Shows declarations in this pad that match the function at the cursor. Local text matching - not compiler or language-server analysis. |
| Complete Relative Path… | Choose a folder you authorize and a relative prefix; pick a matching path to insert. Parent traversal and symbolic links are excluded. |
| Automatic Pairing | Toggles automatic closing of brackets and quotes. |
| Custom Language Profile… | Create a profile with a unique name, a bundled lexer (e.g. cpp, python, sql), extra keywords (up to 16 KiB) and an indent width of 1–8. It appears in the language picker. Up to 100 profiles. |
| Function / Heading Outline… | Shows a menu of functions or headings in the pad; choose one to jump to it. |
| Complete Word | Suggests completions from words already in the pad. |
Advanced Views submenu
| Document Map | Shows a narrow overview strip beside the editor; click it to jump to that line. |
| Split / Unsplit Editor | A second, synchronized view of the same pad. |
| Clone Active Pad in Window | Opens the pad in a separate window that edits the same text. |
| Synchronize Cloned Scrolling | Keeps vertical scrolling aligned between views. |
| Virtual Space | Lets the cursor move past the end of a line. |
| Overwrite Mode | Typing replaces characters instead of inserting. |
| Hide Selected Lines · Show All Lines | Temporarily hides lines from view, and shows them again. |
Close split and cloned views before recording a macro.
View Sessions submenu
Save View Session… stores a named layout: tab order, the active pad, selection, scroll position and whether the editor is split. Restore View Session… brings one back. Text itself stays in normal pad storage, and restoring never archives other pads.
Files and Folders submenu
| Open with Legacy Encoding… | See Encoding. |
| Text Statistics / Unicode / SHA-256… | Shows UTF-8 bytes, UTF-16 positions, characters, lines, the SHA-256 of the UTF-8 text, and the first 64 Unicode code points, for the selection or pad. Copy copies the report. |
| Reveal File in Finder | Shows the pad’s file in Finder (named files only). |
| Print… | Prints the pad as plain monospaced text. |
| Search / Replace in Folder… | See Folder search and replace. |
| Open Large File Read-Only… | See Large-file viewer. |
Folder search and replace
Choose a folder, and a Folder Search window opens:
| Find · Replace | Search text and replacement, with the same literal / escaped / regex modes as Find and Replace. |
| Extensions | Comma-separated extensions without dots (default txt,md,json,csv,log,swift,py,js,ts,html,css,sql). Empty includes every UTF-8 text file. |
| Excluded names | Exact folder or file names to skip (default .git,node_modules,DerivedData,BuildDependencies). No wildcards. |
| Search / Replace menu | Choose Search / Replace, or one of your saved macros to apply to every file. |
| Preview Search / Replace | Lists matching files and changes. Click a result to open that file in ZapPad at the match. |
| Apply Reviewed Batch | After confirmation, backs up the original files privately, then writes the changes. Files changed since the preview stop the batch. |
| Recover Last Batch | Restores the originals, unless those files were edited afterwards. |
| Choose Recovery Batch… | Pick an earlier batch for this folder to recover. |
| Cancel | Stops the current preview or write. If writing had started, recovery copies are kept. |
Limits Hidden files and symbolic links are skipped; files over 16 MiB are skipped; a preview covers up to 1,000 matching files and 64 MiB. Recovery copies stay on disk; there is currently no automatic cleanup.
Large-file viewer
Tools›Files and Folders›Open Large File Read-Only… opens very large files (multi-gigabyte logs included) in a separate read-only window. It never rewrites the file.
- Previous / Next move through 256 KiB pages; the status shows the byte range.
- Search finds case-sensitive literal text across the whole file and lists up to 1,000 byte-offset results. Cancel stops it.
- Filter visible lines (press Return) shows only matching lines on the current page. Save Filter remembers it for the next viewer.
- Follow Tail refreshes the last page once per second, like
tail -f. Searching or paging stops following.
- WARN and ERROR lines are highlighted. A page boundary may split a character; the replacement glyph is display-only.
Comparison window
Opened by Compare with File… or Compare Two Open Tabs…. It is read-only and changes neither side.
- Side by Side or Unified Diff view.
- Ignore whitespace, Ignore case and Ignore line endings options.
- Previous Change / Next Change navigation and Copy Unified Diff.
Examples and Snippets submenu
Teach Macro with Examples… - see Teach with examples.
Insert Snippet / Template… inserts text built from a template with {{name}} placeholders:
- Saved name - load a saved template, or enter a new name to save this one.
- Template - e.g.
{{title}} - {{timestamp}}. {{timestamp}} is filled automatically.
- Values as JSON strings - e.g.
{"title":"Incident 007"}. Every placeholder needs a value.
The result is shown in the review window before insertion. Templates are literal text - no code runs.
Calculate and Compare submenu
| Calculate… | Evaluates arithmetic with + - * /, parentheses and scientific notation, e.g. 1.5e3 / (2 + 3). Uses standard floating-point arithmetic (not financial decimal). Copy copies the answer. |
| Convert Units… | Case-sensitive units: length m km cm mm in ft mi; mass kg g lb; time s min h; data B KB MB KiB MiB GiB; temperature K C F. Offline. |
| Compare JSON Ignoring Key Order… | Compares the selection or pad with a JSON file. If equivalent, says so. If not, the review window shows the file’s text; Apply Changes would replace your selection with it, so choose Cancel unless that’s what you want. |
| Compare CSV by Key Column… | Matches rows by a unique zero-based key column and lists up to the first 50 changed keys. |
Conversions and Text Utilities submenu
Conversion Workbench… opens a separate window with the selection or pad as input: choose a conversion, Preview Conversion, then Copy Result (or Stop). The source pad is never changed. The other items run through the review window:
| Base64 › | Base64 Encode (Padded)… · Base64 Encode (Unpadded)… · Base64 Encode - MIME / Unix EOL… · Base64 Encode Each Line… · Base64 Decode (Whitespace Tolerant)… · Base64 Decode - Strict… · Base64 Decode Each Line… |
| Web and MIME › | Quoted-Printable Encode… · Quoted-Printable Decode… · URL Encode - Component… · URL Encode - RFC 1738… · URL Encode - RFC 1738 Each Line… · URL Encode - Extended Component… · URL Encode - Extended Each Line… · URL Encode - Every UTF-8 Byte… · URL Encode - Every Byte Each Line… · URL Encode Each Line… · URL Decode… · Decode SAML Request / Response… (decoding only; signatures are not verified) |
| Conversion › | Text → Hex (UTF-8)… · Hex → Text (UTF-8)… · Escape as JSON String… · Decode JSON String… |
| Case, Lines and Whitespace › | Title Case… · Sentence Case… · Invert Case… · Trim Leading Whitespace… · Trim Trailing Whitespace… · Tabs → Spaces (Tab Stops of 4)… · Leading Spaces → Tabs (Width 4)… · Reverse Line Order… · Sort Lines Descending… · Duplicate Lines… · Remove Empty Lines (Keep Whitespace-Only)… · Join Lines Without Separator… |
Checksums submenu
For each of MD5, SHA-1, SHA-256 and SHA-512: Generate from Selection / Pad…, Generate from Files… (one or more files) and Copy Selection / Pad Checksum. Results appear in a window with Copy Result. MD5 and SHA-1 are legacy checksums, not for security.
Syntax-Colored Export submenu
Export HTML…, Export RTF…, Copy HTML, Copy RTF and Copy All Formats export the selection or pad with its syntax colors - handy for documents and slides. Up to 2 MiB per export. The pad isn’t changed.
Bundled Tool Packs…
Show or hide the Conversions and Text Utilities, Checksums and Syntax-Colored Export groups in the Tools menu. These are built in; no plug-ins or scripts are downloaded.
Data Inspection
Tools › Data Inspection contains the following native tools. Inspectors read a snapshot of the selection, or the whole pad if nothing is selected. Reopen an inspector after editing the source.
- JSON Inspector…: expand objects and arrays, select nodes to locate their exact source range, and use Copy Path / Copy Value. Numeric source tokens are preserved. Run Query supports RFC 6901 JSON Pointer (
/users/0/name) and JSONPath property/index paths with wildcards ($.users[*].name), not filter expressions.
- Check JSON Schema…: choose a local JSON schema. Supported assertions include types, properties, required fields, additionalProperties, items, enum/const, string lengths and patterns, item counts, numeric bounds, allOf/anyOf/oneOf/not, and local
#/… references. This is an explicit subset, not complete draft conformance. Unsupported assertions produce an error. Patterns use bounded PCRE2; numeric schema literals are limited to 15 digits and numeric comparisons to Decimal range/precision. No remote schema is fetched.
- Delimited Data Check…: detect comma, tab, semicolon or pipe separators, or choose one explicitly. Quoted commas, escaped quotes and multiline fields are parsed. The grid marks invalid records/fields in red; diagnostics use logical record numbers. Up to 100 columns are displayed.
- Infer SchemaLoad Schema… and Save Schema…: edit reusable column rules as JSON, for example
[{"name":"id","type":"string","required":true},{"name":"amount","type":"decimal","required":false}]. Types are string, integer, decimal, boolean and date (YYYY-MM-DD). Inference is a suggestion; set explicit rules to detect incorrect data types reliably.
- XML Inspector…: checks well-formedness, shows an expandable element tree and locates start tags in the source. Copy a node’s path or value, run node-selecting XPath queries, and enter namespace prefixes as JSON (for example
{"x":"urn:example"}). Preview XML Formatting… opens Review Changes before applying. DTDs/external entities are disabled. XSD validation and XSLT are not included.
- Column Tools…: choose a 1-based column and header setting. Sort text or numbers in either direction, align cells left/right as a plain-text display table, calculate a new column using
c1 * c2and convert Unix seconds/milliseconds to ISO 8601 or ISO timestamps to Unix seconds. Use an IANA time zone such as UTC or America/Chicago. Calculations use floating point; keep identifiers as strings. Sorting equal keys retains their original order. Every edit opens Review Changes and can be undone.
- Adaptive Tab Alignment: visually aligns tab-separated columns in the current editor view without inserting spaces or changing the source. Refreshes after typing. Limits: 2 MiB, 5,000 lines, 64 columns, 50,000 cells. It switches off if those limits are exceeded.
JSON and XML inspection: 4 MiB, 128 levels; JSON tree 100,000 nodes, XML tree 50,000 elements. Delimited checking: 4 MiB / 250,000 cells, up to 1,000 reported issues. XPath: node queries up to 2 KiB, 10,000 results and 16 MiB output. These tools do not execute user code or download plugins.