Batch Text Replace

Replace text across a whole document in one click. Swap commas for line breaks, turn semicolons into commas, replace spaces with tabs — or pick Custom text and search for any word or phrase. No more hunting through the document line by line.

Everything runs locally in your browser, so your text never leaves the page.

How to use

  • Pick what to find in the left dropdown and what to put in its place in the right one, then hit Replace to update every match at once.
  • Both dropdowns end with a "Custom text" option. Select it and an input box appears to the left of that dropdown — type any characters, a word or a whole phrase there, and matching is done against exactly what you typed.
  • Click the ⇌ button between the dropdowns to swap the two selections, which is handy for undoing a replacement or replacing in the opposite direction.
  • Tooltips appear when you hover over buttons and options.
  • Your dropdown choices, custom text and the Ignore case setting are stored locally and restored the next time you open the page.

What each option does

  • Replace: Replaces every occurrence of the first value with the second and tells you how many matches were changed. If nothing matches, you get a warning instead.
  • Custom text: Select "Custom text" in a dropdown to reveal an input box beside it. Matching is literal and exact, so every character counts. Leave the replacement text empty to delete every match. Non-English punctuation such as Chinese full-width commas can be typed here too.
  • Ignore case: An option below the editor. When ticked, matches ignore letter case — searching for abc also matches ABC and Abc, and all of them get the replacement text. Off by default, so matching is exact.
  • Swap: Exchanges the two dropdown selections along with their custom text, e.g. comma → line break becomes line break → comma.
  • Remove blank lines: Deletes every blank line, including lines that contain only spaces or tabs; lines with content stay as they are. Useful for tidying up after a replacement.
  • Available characters: comma, semicolon, Tab, space, line break, pipe, slash, backslash, colon, period, hyphen, underscore — plus Custom text for anything else.

Common uses

  • Convert comma-separated data exported from Excel or a database into one item per line
  • Turn line breaks into commas to build a comma-separated list from a column of text
  • Replace pipes with commas before importing a log or a delimited file
  • Replace spaces with tabs, or tabs with spaces, to normalise indentation
  • Rename a recurring word or URL fragment across a whole config file

FAQ

  • Q: Can I replace more than one character?
    A: Yes. Choose "Custom text" in either dropdown and type whatever you need — several characters, a word or a phrase. The whole string is matched as-is, and you can leave the replacement empty to delete matches. The input box is single-line, so to match a line break use the built-in "Line break" option instead.
  • Q: Why aren't full-width characters such as Chinese commas in the list?
    A: The dropdowns list the characters people replace most often in English text. For anything else — including full-width symbols like ,, or a whole word — choose "Custom text" and paste or type it into the input box.
  • Q: Can I replace tabs with spaces?
    A: Yes — choose Tab or Space from the list. It is commonly used to clean up indentation in code or text copied from documents.
  • Q: Can I undo a replacement?
    A: Click ⇌ to swap the two selections, then run Replace again. If the original text matters, copy it somewhere safe beforehand.
  • Q: Is my text uploaded to a server?
    A: No. Every replacement happens locally in your browser and nothing is sent anywhere.