JavaScript Pad end

padEnd() pads the end of a string with a filler until it reaches a target length. It is the mirror of padStart() and is used to left-align text in fixed-width layouts.

Syntax

str.padEnd(targetLength, padString)

Examples

Input Arguments Output
"5" 3, "0" "500"

Try it live

Type your input and see Pad end transform it instantly.

Pad end()

Type above to see the result…

Want to go further? Chain Pad end with other functions, pipe one output into the next and watch your data transform in the visual Playground.

Related functions

© 2026 Heifara Buval