Trim Text

Simplify your text tasks with three simple steps, Free!

The "Trim Text" tool allows you to remove unwanted spaces from the beginning (left trim) and/or end (right trim) of your text. You can choose to trim only from the left side, only from the right side, or both sides at once. Additionally, you can process multiple lines individually by enabling the line-by-line trimming option. This tool is perfect for cleaning up text copied from various sources or formatting text for specific requirements.

Input Text Lines

Text with Result

Tool Options

Trimming and Lines

Trim text on the left side.

Trim text on the right side.

Trim text on each line separately.

What Is a Text Trimmer?

With this tool you can left-trim and right-trim text. You can selectively remove extra spaces only from the right side, or only from the left, or if you enable both options, then both sides (selected by default). You can also process several text lines individually by using the line-by-line trimming function.

Tool Illustration

Trim Text Examples

Click to try!

Trim Both Sides

Remove spaces from both the beginning and end of text.

    This text has spaces at both the beginning and end.    
This text has spaces at both the beginning and end.

Left Trim Only

Remove spaces only from the beginning of text.

    This text has spaces only removed from the left side.    
This text has spaces only removed from the left side.    

Right Trim Only

Remove spaces only from the end of text.

    This text has spaces only removed from the right side.    
    This text has spaces only removed from the right side.

Line-by-Line Trimming

Trim each line of text individually.

    Line 1 with spaces at both ends    
    Line 2 with spaces at both ends    
    Line 3 with spaces at both ends    
Line 1 with spaces at both ends
Line 2 with spaces at both ends
Line 3 with spaces at both ends

Line-by-Line Left Trim

Remove spaces from the beginning of each line.

    Line 1 with spaces only removed from left    
    Line 2 with spaces only removed from left    
    Line 3 with spaces only removed from left    
Line 1 with spaces only removed from left    
Line 2 with spaces only removed from left    
Line 3 with spaces only removed from left    

Line-by-Line Right Trim

Remove spaces from the end of each line.

    Line 1 with spaces only removed from right    
    Line 2 with spaces only removed from right    
    Line 3 with spaces only removed from right    
    Line 1 with spaces only removed from right
    Line 2 with spaces only removed from right
    Line 3 with spaces only removed from right

Privacy Policy

Attention: All tools are done in your browser using JavaScript. We don't send a single bit about your input data to our servers. There is no server-side processing at all.