iPaaS Group

n8n · MySQL node

Decimal numbers returned as strings

Short answer

The n8n MySQL node returns DECIMAL values as strings by default to avoid losing precision. Turn on the Output Decimals as Numbers option to get JavaScript numbers, but leave it off for money, identifiers and values you compare or store again.

VerifiedLast verified

01Error text

n8n error
Decimal numbers returned as strings

02Likely causes

  • By default the MySQL node returns DECIMAL values, and NUMERIC as its alias, as strings to avoid precision loss.

03How to fix it

  1. Turn on the Output Decimals as Numbers option to convert them to JavaScript numbers. Values beyond about 15 significant digits are rounded without warning.
  2. Leave the option off for money, identifiers and values that are compared or stored again.
  3. Or convert the values after the node with toFloat() and toFixed(), or with an Edit Fields (Set) node. Precision loss can still occur.

04Fix it with AI

Copy this prompt into Claude Code, ChatGPT or any AI assistant. It already holds the error, the likely causes and the fix steps, so the assistant starts from what is known instead of guessing.

Prompt
I'm getting this error in n8n (MySQL node):

Decimal numbers returned as strings

What it usually means: The n8n MySQL node returns DECIMAL values as strings by default to avoid losing precision. Turn on the Output Decimals as Numbers option to get JavaScript numbers, but leave it off for money, identifiers and values you compare or store again.

Likely causes:
- By default the MySQL node returns DECIMAL values, and NUMERIC as its alias, as strings to avoid precision loss.

Fix steps that usually work:
1. Turn on the Output Decimals as Numbers option to convert them to JavaScript numbers. Values beyond about 15 significant digits are rounded without warning.
2. Leave the option off for money, identifiers and values that are compared or stored again.
3. Or convert the values after the node with toFloat() and toFixed(), or with an Edit Fields (Set) node. Precision loss can still occur.

Help me fix it. If you can read my project files, find where this error comes from. If not, ask me for what you need (the failing step, its input, the connection or config). Check the likely causes one by one, tell me which one it is and why, then give me the exact change to make. Do not change anything in production. Reference: https://ipaaserrors.com/n8n/mysql-decimal-numbers-returned-as-strings

Nothing is sent anywhere from this page. Read what the assistant suggests before you apply it.

iNotes

The docs describe this as a problem and do not quote a fixed error message, so the text above is the docs' own heading.

05Official documentation

Test every fix in a non-production environment before you apply it to production. See how entries are verified.

More for n8n work:Open n8n jobsn8n pay estimates