SQL LIKE Tester

SQL LIKE Tester

Updated August 21, 2026

SQL LIKE tester online. Test % and _ wildcards, ESCAPE, and case-insensitive ILIKE against sample strings. Free LIKE pattern matcher.

Strings (one per line)

Matches

  • (empty)

Features

  • Test SQL LIKE and ILIKE patterns against one string per line
  • % matches any sequence, _ matches one character
  • Optional ESCAPE character for literal % and _
  • Case-insensitive mode (ILIKE / LOWER)
  • Live match highlighting
  • Nothing is uploaded

Common Use Cases

  • Debug why a search box LIKE is matching too much
  • Check an email domain pattern before shipping it
  • See the difference between %sql and %.sql
  • Verify ESCAPE when the user may type % in the search

LIKE is not a regex

LIKE is SQL’s wildcard match. % is “any length”, _ is “one character”. It is not POSIX regex: .* is two literal characters plus a wildcard in LIKE, not “everything”.

PostgreSQL ILIKE is case-insensitive LIKE. MySQL LIKE case folding depends on collation. This tester’s insensitive mode always folds case in the browser so the result is predictable.

Use ESCAPE when the pattern itself may contain % or _. Example: LIKE '%10\%%' ESCAPE '\' matches text that contains 10%.

Examples

Valid - Suffix match
%.sql
Valid - Single char
a_c
Valid - Need escape
100%

Frequently Asked Questions

How do I match a literal percent sign?

Set an ESCAPE character (often \) and write \% in the pattern. Without ESCAPE, % always means “anything”.

Is LIKE '%x%' slow?

A leading wildcard usually cannot use a normal B-tree index. That is an engine concern. This page only tests the match, it does not plan queries.

Does this support SIMILAR TO or regex?

No. Use the Regex Tester for POSIX regular expressions.

Tips

  • Put user input through ESCAPE or switch to parameterized equality when you do not need wildcards.
  • TRIM the haystack if your table has trailing spaces and the pattern does not.