# Enable JSON output for Zeek logs instead of TSV

**URL:** <https://community.zeek.org/t/enable-json-output-for-zeek-logs-instead-of-tsv/7033>\
**Category:** Zeek\
**Created:** [May 9, 2023, 7:57pm UTC](https://community.zeek.org/t/enable-json-output-for-zeek-logs-instead-of-tsv/7033 "2023-05-09T19:57:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![slsanna](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@slsanna](https://community.zeek.org/u/slsanna)\
**Post date:** [May 9, 2023, 7:57pm UTC](https://community.zeek.org/t/enable-json-output-for-zeek-logs-instead-of-tsv/7033/1 "2023-05-09T19:57:11Z")

</div>

hello everyone! I read that zeek can also output log files in json format, instead of the standard output format. Can you help me setting this option? Thanks!

---

<div class="post-metadata">

**Author:** ![Christian](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/christian/32/593_2.png) [@Christian](https://community.zeek.org/u/Christian)\
**Post date:** [May 9, 2023, 8:09pm UTC](https://community.zeek.org/t/enable-json-output-for-zeek-logs-instead-of-tsv/7033/2 "2023-05-09T20:09:21Z")

</div>

Hi there!

`zkg install add-json` should do all you need — take a look here: [GitHub - J-Gras/add-json: Enables additional JSON-logging for Zeek.](https://github.com/J-Gras/add-json)

You may need to say `zkg install --version master add-json` to pull in some recent fixes if you get a message around failing tests, depending on your Zeek version.

For more low-level configuration, you can also simply `@load tuning/json-logs`, or redef [`LogAscii::use_json=T`](https://docs.zeek.org/en/master/scripts/base/frameworks/logging/writers/ascii.zeek.html?highlight=LogAscii#id-LogAscii::use_json).

Hope this helps,  
Christian

---

<div class="post-metadata">

**Author:** ![slsanna](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@slsanna](https://community.zeek.org/u/slsanna)\
**Post date:** [May 9, 2023, 8:24pm UTC](https://community.zeek.org/t/enable-json-output-for-zeek-logs-instead-of-tsv/7033/3 "2023-05-09T20:24:07Z")

</div>

> [@Christian](#):
>
> @load tuning/json-logs

I tried both the zkg install and the low level one but none of them worked. For the low level, should I modify the local.zeek file right?

---

<div class="post-metadata">

**Author:** ![Christian](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/christian/32/593_2.png) [@Christian](https://community.zeek.org/u/Christian)\
**Post date:** [May 9, 2023, 8:33pm UTC](https://community.zeek.org/t/enable-json-output-for-zeek-logs-instead-of-tsv/7033/4 "2023-05-09T20:33:23Z")

</div>

> For the low level, should I modify the local.zeek file right?

Yeah. If you’re running Zeek via `zeekctl`, remember to do a `zeekctl deploy` after making changes.

For basic testing you can also try things like `zeek -r some.pcap tuning/json-logs` or `zeek -r some.pcap LogAscii::use_json=T`.

Best,  
Christian

---

<div class="post-metadata">

**Author:** ![slsanna](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@slsanna](https://community.zeek.org/u/slsanna)\
**Post date:** [May 10, 2023, 8:18am UTC](https://community.zeek.org/t/enable-json-output-for-zeek-logs-instead-of-tsv/7033/5 "2023-05-10T08:18:23Z")

</div>

> [@Christian](#):
>
> tuning/json-logs

Thank you! I solved it

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [April 8, 2026, 7:49pm UTC](https://community.zeek.org/t/enable-json-output-for-zeek-logs-instead-of-tsv/7033/6 "2026-04-08T19:49:33Z")

</div>

Closed on April 8, 2026, 7:49pm UTC

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

---

<div class="post-metadata">

**Author:** ![tlacuache](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/tlacuache/32/656_2.png) [@tlacuache](https://community.zeek.org/u/tlacuache)\
**Post date:** [November 10, 2026, 8:55pm UTC](https://community.zeek.org/t/enable-json-output-for-zeek-logs-instead-of-tsv/7033/7 "2026-11-10T20:55:16Z")

</div>

Just to add the documentation link to @Christian’s correct answer, here’s where you can find it: [LogAscii::use\_json](https://docs.zeek.org/en/master/scripts/base/frameworks/logging/writers/ascii.zeek.html#id-LogAscii::use_json)
