---
description: Pure Java AWK for command-line use and Java embedding.
date_published: 2026-05-13
date_modified: 2026-05-13
canonical_url: https://jawk.io/index.html
---

# Jawk: AWK for Java

On this Page

- [Overview](#overview)
- [Compatibility and Compliance](#compatibility-and-compliance)
- [Key Capabilities](#key-capabilities)
- [Differences with Traditional AWK](#differences-with-traditional-awk)
- [History of Jawk](#history-of-jawk)
- [Next Steps](#next-steps)

## [Overview](#overview)

Jawk is a pure Java implementation of [AWK](https://en.wikipedia.org/wiki/AWK)[1]. You can run AWK programs in a JVM application and integrate with your Java code:

CLI

**CLI**

```shell-session
$ echo "hello world" | java -jar jawk-6.4.00-standalone.jar '{ print $2 ", " $1 "!" }'
world, hello!
```

Java

**Java**

```java
Awk awk = new Awk();
String result = awk.script("{ print toupper($0) }").input("hello world").execute();
// result = "HELLO WORLD\n"
```

## [Compatibility and Compliance](#compatibility-and-compliance)

**POSIX**    100%      **One True Awk**    97%      **gawk**    24%     

The above scores are calculated from the latest compatibility tests during `mvn verify site`. See the full [compatibility dashboard](compatibility.html)[2] for per-suite maps and the [Failsafe report](failsafe.html)[3] for detailed test results.

## [Key Capabilities](#key-capabilities)

- CLI-compatible AWK execution with inline scripts, script files, operands, and input files
- Java entry points for script execution, expression evaluation, tuple compilation, and repeated reuse
- Structured input through `InputSource` for row-oriented or already-tokenized data
- Explicit extension loading through the Java API or the CLI
- Tuple serialization for CLI precompilation and later loading
- Sandbox-specific tuples and runtime components through `SandboxedAwk`

## [Differences with Traditional AWK](#differences-with-traditional-awk)

Jawk aims to be a practical AWK implementation for JVM environments, but it is not a byte-for-byte clone of every historical AWK behavior. Some differences are deliberate and come from the way Jawk integrates with Java:

- Regular expression behavior follows Java's regex engine, which may differ from traditional AWK regexes in edge cases.
- `printf()` and `sprintf()` try to replicate C-style formatting but may have differences due to Java's formatting capabilities and limitations.
- Some floating-point edge cases may differ due to Java's handling of floating-point arithmetic and representation.
- Jawk resolves user-defined function calls during compilation. It does not defer all of that work to runtime.

## [History of Jawk](#history-of-jawk)

| Date | Event |
| --- | --- |
| 2006-⁠02-⁠26 | Initial release of [Jawk 0.1 on SourceForge](https://sourceforge.net/projects/jawk/files/jawk/0.1/)[4] by [Danny Daglas](https://sourceforge.net/u/ddaglas/profile/)[5], the original author of this project. |
| 2008-⁠01-⁠18 | Last release of Jawk 1.02 on SourceForge, corresponding to the [official (now defunct) Jawk website](https://web.archive.org/web/20260209081949/https://jawk.sourceforge.net/)[6]. |
| 2012-⁠07-⁠18 | [Fork on GitHub](https://github.com/hoijui/Jawk)[7] by [hoijui](https://github.com/hoijui)[8] (a.k.a. Robin Vodruba), with the first commit being a copy of the original Jawk 1.02 source code + Maven. |
| 2018-⁠02-⁠06 | Bertrand Martin begins maintaining a private fork at [Sentry Software](https://www.sentrysoftware.com/)[9] with a first private release of Jawk 1.03. |
| 2023-⁠07-⁠20 | Bertrand's fork is **finally** made public on Sentry Software's GitHub repository. Jawk is in version 2.1.xx. |
| 2023-⁠12-⁠14 | [Jawk 3.0.00 is released on Maven Central](https://central.sonatype.com/artifact/org.sentrysoftware/jawk/3.0.00)[10] under `org.sentrysoftware.jawk`. |
| 2025-⁠02-⁠13 | [Version 3.3.04](https://central.sonatype.com/artifact/org.sentrysoftware/jawk/3.3.04)[11] is the last version of Jawk released by Sentry Software. [MetricsHub](https://metricshub.com)[12] takes over the project. |
| 2025-⁠11-⁠04 | MetricsHub releases [Jawk 5.0.00](https://central.sonatype.com/artifact/org.metricshub/jawk/5.0.00)[13] on Maven Central. |
| 2026-⁠03-⁠26 | Bertrand Martin moves Jawk to an independent [jawkio/jawk GitHub repository](https://github.com/jawkio/jawk)[14], dedicated to Jawk only. |
| 2026-⁠04-⁠16 | Version 6.0.00 of Jawk is released on [Maven Central](https://central.sonatype.com/artifact/io.jawk/jawk/6.0.00)[15] under `io.jawk`. The project is now hosted at [jawk.io](https://jawk.io)[16]. |

## [Next Steps](#next-steps)

- [Install Jawk](install.html)[17]
- [Embed Jawk in Java](java.html)[18]
- [Learn the CLI](cli.html)[19]
- [Work with variables and arguments](java-variables.html)[20]
- [Work with structured input](java-input.html)[21]
- [Compile, evaluate, and reuse tuples](java-compile.html)[22]
- [Load or write extensions](extensions.html)[23]
