# HOW TO logstash convert all fields to String

**URL:** <https://discuss.elastic.co/t/how-to-logstash-convert-all-fields-to-string/242844>\
**Category:** Logstash\
**Created:** [July 28, 2020, 6:59am UTC](https://discuss.elastic.co/t/how-to-logstash-convert-all-fields-to-string/242844 "2020-07-28T06:59:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thaopt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thaopt/32/72649_2.png) [@thaopt](https://discuss.elastic.co/u/thaopt)\
**Post date:** [July 28, 2020, 6:59am UTC](https://discuss.elastic.co/t/how-to-logstash-convert-all-fields-to-string/242844/1 "2020-07-28T06:59:00Z")

</div>

Hello I am a foreign developer.

My process is: Json \>\> Filebeat \>\> logstash \>\> Kibana

So how can i convert all of fileds to String in Json via Logstash Filter config?

P/s: I added this config to pipeline but not work:  
" mutate { convert =\> ["\*" =\> "string"] } "

Thank You!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 28, 2020, 8:33am UTC](https://discuss.elastic.co/t/how-to-logstash-convert-all-fields-to-string/242844/2 "2020-07-28T08:33:27Z")

</div>

You might find it easier to use an Elasticsearch template to do this.

What sort of processing does Logstash do?

---

<div class="post-metadata">

**Author:** ![thaopt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thaopt/32/72649_2.png) [@thaopt](https://discuss.elastic.co/u/thaopt)\
**Post date:** [July 29, 2020, 4:12am UTC](https://discuss.elastic.co/t/how-to-logstash-convert-all-fields-to-string/242844/3 "2020-07-29T04:12:30Z")

</div>

Thank @warkolm  
I'm using Elasticsearch template, but I need to add one by one field to the template. How can Elasticsearch (or Logstash) auto convert all fields to String?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 26, 2020, 4:17am UTC](https://discuss.elastic.co/t/how-to-logstash-convert-all-fields-to-string/242844/4 "2020-08-26T04:17:30Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
