--- title: 'Liquid filters: strip_newlines' description: Strips all newline characters (line breaks) from a string. api_name: liquid source_url: html: 'https://shopify.dev/docs/api/liquid/filters/strip_newlines' md: 'https://shopify.dev/docs/api/liquid/filters/strip_newlines.md' --- # strip\_​newlines ```oobleck string | strip_newlines ``` returns [string](https://shopify.dev/docs/api/liquid/basics#string) Strips all newline characters (line breaks) from a string. ##### Code ```liquid {{ product.description }} {{ product.description | strip_newlines }} ``` ##### Data ```json { "product": { "description": "

Are you low on health? Well we've got the potion just for you!

\n

Just need a top up? Almost dead? In between? No need to worry because we have a range of sizes and strengths!

" } } ``` ##### Output ```html

Are you low on health? Well we've got the potion just for you!

Just need a top up? Almost dead? In between? No need to worry because we have a range of sizes and strengths!

Are you low on health? Well we've got the potion just for you!

Just need a top up? Almost dead? In between? No need to worry because we have a range of sizes and strengths!

```