← All text tools

SQL Parameter Inliner

Replace the placeholders ?, $1, :name, @name, %s or %(name)s in a logged SQL statement with the parameter values, so you can read it or run it by hand.

  • Free
  • No sign-up
  • Works on any device

About SQL Parameter Inliner

Application logs often show a statement with placeholders on one line and the parameter values on another. This tool puts the values back into the statement so you can read it, paste it into a console or compare it with a slow query log. It understands ?, $1, :name, @name, %s and %(name)s, skips placeholders inside quoted text and comments, and accepts values as a JSON list or object, one value per line, a MyBatis Parameters line or Hibernate binding lines. Example: WHERE name = ? with the value O'Brien becomes WHERE name = 'O''Brien'.

How to use SQL Parameter Inliner

  1. Paste the SQL statement with its placeholders.
  2. Paste the parameter values: a JSON list such as [5, "Ann", null], a JSON object for named placeholders, or one value per line.
  3. Copy the finished statement. Check the warning if some placeholders had no value or some values were not used.

Why use this tool?

Also known as

Frequently asked questions

Is the result safe to run on a production database?

Only if you have checked the values. The point of this tool is reading and debugging. Application code should always send values as parameters, never build SQL by pasting them in.

How are text, numbers and NULL written?

Numbers stay as they are, text is put in single quotes with any quote doubled, NULL becomes NULL, and booleans become TRUE and FALSE or 1 and 0 as you choose.

Why was a placeholder in my string not replaced?

A question mark or colon inside a quoted string or a comment is text, not a placeholder, so it is left alone. Casts such as value::int in PostgreSQL are not placeholders either.

Is SQL Parameter Inliner free?

Yes. SQL Parameter Inliner on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.