Card Number Formatter
Format card numbers with the right spacing per brand (Amex 4-6-5, others 4-4-4-4).
Tool inputs stay in your browser · optional AI search sends your query
Good to know: Detects the brand per line. Non-digit characters are removed first.
How to use it (step by step)
- 1Type or paste your text into the “Input” box. There is already an example in it so you can see how it works; press Clear to start with your own.
- 2Choose your settings: “Separator”.
- 3The answer appears right away in the “Result” box. No button needed.
- 4Press Copy and paste the result wherever you need it.
Words to know
- Beautify / format
- Adding line breaks and indentation so code is easy for humans to read. It does not change what the code does.
More in Cards & Payments
Refund Cost CalculatorWhat a refund costs you when the original card fee is not returned.Card Minimum Purchase CalculatorThe smallest sale where the card fee stays under your chosen percentage.Dynamic Currency Conversion (DCC) Markup CalculatorPay in local or home currency? See the hidden markup in the rate you were offered abroad.Payout / Settlement CalculatorNet payout from gross card sales after fees, refunds, chargebacks and a reserve.Rolling Reserve CalculatorHow much cash a rolling reserve ties up, and when it is released.Test Credit Card Numbers (All Providers)Official sandbox card numbers from Stripe, PayPal, Braintree, Adyen, PayMongo, Xendit and Square, searchable.