SmartQueryTools

Find & Replace in YAML Files Online

Find and replace text values in YAML files directly in your browser. Supports plain text and regex patterns across any column — no upload required.

How to find & Replace in YAML files

  1. Drop your file onto the upload area. The tool shows the row count, how many text columns it found, and the first 200 rows.
  2. In Apply to column, keep All text columns or pick one column. Number, date and boolean columns are never changed.
  3. Type the text to find and the replacement. Leave Replace with empty to delete every match.
  4. Tick Use regular expression if the Find box holds a pattern rather than literal text, then click Find & Replace.
  5. Check the result preview and download the file in the same format.

Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.

Worked example

A contractor list was typed in by hand, so phone numbers mix brackets, spaces, dashes and a country prefix. The SMS gateway wants digits only.

Input (YAML)

- name: Aroha Ngata
  phone: (021) 555-0143
  city: Auckland
- name: Liam Park
  phone: 021 555 0198
  city: Hamilton
- name: Mele Tupou
  phone: +64 21 555 0112
  city: Auckland
- name: Sam Reid
  phone: null
  city: Tauranga

Settings

  • Apply to column: phone
  • Find: [^0-9]
  • Replace with: (empty)
  • Use regular expression: ticked

Result

namephonecity
Aroha Ngata0215550143Auckland
Liam Park0215550198Hamilton
Mele Tupou64215550112Auckland
Sam ReidNULLTauranga

The pattern [^0-9] matches any character that is not a digit, and every match in the cell is replaced, not just the first. Brackets, spaces, dashes and the plus sign are removed. The phone column stays text, so the leading zero survives. Sam's empty phone stays empty. Limiting the run to the phone column keeps the other columns untouched.

Frequently Asked Questions

Is the search case-sensitive?

Yes, in both modes. With Use regular expression ticked, you can start the pattern with (?i) to ignore case, for example (?i)limited.

Can I use capture groups in the replacement?

Yes. In regex mode, write \1, \2 and so on in Replace with. For example, find (\d{4})-(\d{2}) and replace with \2/\1 to turn 2026-04 into 04/2026. The syntax is RE2, so lookaheads and lookbehinds are not supported.

Does it replace every match or only the first one in each cell?

Every match. Both plain text and regex mode replace all occurrences in each cell of the targeted columns.

Related Tools