Tested tool guide
Tested browser tools
Checked August 16, 2026
What Swift Formatter does, with a checked example
Swift code arrives with tabs, spaces, and judgment calls mixed in, but Apple's whitespace conventions are mostly fixed rules: a space after the colon in `let x: Int`, spaces around operators, nothing inside the angle brackets of `Array<Int>`. This tool re-emits whatever you paste with those rules applied, plus configurable indentation and line wrapping, entirely in the browser, so the code never leaves the page. The surprise is what it will not do: it touches only whitespace and line breaks. Badly named variables, force unwraps, and other style sins pass through untouched.
Worked example
A concrete input and expected output from the current implementation.
Input
func add(a:Int,b:Int)->Int{
let sum=a+b
return sum
}
->
Expected output
func add(a: Int, b: Int) -> Int {
let sum = a + b
return sum
}
The colon, comma, arrow, and operator spacing all follow Apple's conventions, and the body is indented two spaces per the selected setting. No wrapping occurs because every line fits within the configured width. Reformatting the output returns identical text.