JavaScript Trim start

trimStart() removes whitespace from the beginning of a string only, leaving the end intact. It returns a new string.

Syntax

str.trimStart()

Examples

Input Arguments Output
" hi " "hi "

Try it live

Type your input and see Trim start transform it instantly.

Trim start()

Type above to see the result…

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

Related functions

© 2026 Heifara Buval