Java String Formatter

Use Java String Formatter, review the result, and keep the original until the output is checked.

Input Java String
Java String Format
Formatted Java
Formatted Output
Formatted Java code will appear here...

Java Format Reference

%s
String
%d
Integer
%f
Float
%n
Newline
%tD
Date
{0}
MessageFormat
100% browser-side processing — your data is never uploaded to any server. · Per-tool input limit: 1 MB
100% browser-based No upload to server Free to use

Frequently Asked Questions About Java String Formatter

Does it compile my Java code?

No. It builds and checks the format string and its argument list, which is where IllegalFormatConversionException comes from.

Why does my decimal separator change?

Formatting uses a locale. Pass an explicit Locale to keep output stable across machines.