Skip to tool

SQL REPLACE() Online

Replace target text with another value.

The output updates as you type. The tool processes input in your browser.

Worked example

Literal replacement treats punctuation as text. Use the regex replacement tool when the target is a pattern. Use PostgreSQL’s function reference to adapt the input to SQL syntax.

Search
"hello"
Replace
"hi"
Count (-1 all)
-1
Sample input
hello world hello
Sample output
hi world hi

Using this operation in SQL

The interactive result uses JavaScript. Check the database dialect. PostgreSQL text functions use SQL-style one-based positions and LIKE uses its own pattern syntax.

SQL reference