Question

com.facebook.ktfmt.onlineformatter

Thought

Thought for 16s

Answer

com.facebook.ktfmt.onlineformatter is the Java/Kotlin package name used by ktfmt’s “online formatter” backend—an AWS Lambda service that formats Kotlin code with ktfmt (it’s what powers the web playground). (Android Git Repositories)

Where you’ll see it

  • In the ktfmt online playground (browser-based formatter). (Android Git Repositories)
  • In source code under an online_formatter/ module that builds/deploys the Lambda; the deploy script builds two jars, one containing the com.facebook.ktfmt.onlineformatter package and another with dependencies. (Android Git Repositories)

If your goal is just “format Kotlin code”

If you tell me where you encountered that string (stack trace, build file, dependency list, etc.), I can point you to the exact fix/meaning in that context.

Question

com.facebook.ktfmt.onlineformatter is the Java/Kotlin package name used by ktfmt’s “online formatter” backend—an AWS Lambda service that formats Kotlin code with ktfmt (it’s what powers the web playground). (Android Git Repositories)

Where you’ll see it

  • In the ktfmt online playground (browser-based formatter). (Android Git Repositories)
  • In source code under an online_formatter/ module that builds/deploys the Lambda; the deploy script builds two jars, one containing the com.facebook.ktfmt.onlineformatter package and another with dependencies. (Android Git Repositories)

If your goal is just “format Kotlin code”

If you tell me where you encountered that string (stack trace, build file, dependency list, etc.), I can point you to the exact fix/meaning in that context.

Thought

Responding with cleaned-up answer and citations

I’ll confirm the previous answer’s accuracy, restate it with cleaned-up citations (no raw URLs), and break it down into bullet points: what the package means, why the user might see it, and what to do if it’s in their build. I’ll also mention the ktfmt web playground and verify the lambda setup.

Thought for 23s

Answer

Yep — what you pasted is accurate.

What com.facebook.ktfmt.onlineformatter refers to

It’s the package used by ktfmt’s “online formatter” backend, implemented as an AWS Lambda. In the ktfmt repo’s online_formatter/ module, the deploy script explicitly builds two JARs: one containing the com.facebook.ktfmt.onlineformatter code and one containing dependencies (including ktfmt). (Android Git Repositories)

Where it shows up

  • The ktfmt web playground is the front-end that talks to that online formatter backend. (Facebook)
  • The repo’s online_formatter/ code (Lambda build/deploy module) is where that package lives. (Android Git Repositories)

If you’re seeing it in your own project (common scenarios)

  • You only want formatting locally/CI: you generally want the ktfmt CLI / Gradle plugin / Spotless integration, not the online formatter module. The ktfmt README lists these integration paths. (Android Git Repositories)
  • It appears in a dependency tree or shaded JAR: it often means you (or a tool) pulled in/bundled the online formatter JAR (or something that repackages it), rather than just using ktfmt as a formatter dependency. The standard Maven coordinates for ktfmt itself are com.facebook:ktfmt. (Maven Repository)

If you paste where you saw the string (e.g., a Gradle dependencies snippet, a stack trace, or a JAR name), I can tell you which dependency is bringing it in and the cleanest way to remove it.

Thought

Verifying link and offering next steps

The user shared a link that repeats a conversation, and they may want to know how to handle the package in their Gradle dependencies. I'll suggest using the command ./gradlew dependencies to locate com.facebook:ktfmt, excluding the online_formatter. I’ll keep the response straightforward, providing context without overloading with unnecessary details.

Thought for 14s

Answer

I opened that link — it’s a Chat01.ai transcript (created April 4, 2026) that repeats the explanation about com.facebook.ktfmt.onlineformatter. (chat01.ai)

Here’s the ground-truth from ktfmt’s own sources:

  • In ktfmt’s online_formatter/ module (the AWS Lambda backend), the README says the deploy script builds two JARs, and one of them contains the com.facebook.ktfmt.onlineformatter package. (Android Git Repositories)
  • The main ktfmt README points to a live playground at facebook.github.io/ktfmt/. (Android Git Repositories)

What to do if you see com.facebook.ktfmt.onlineformatter in your project

Most of the time it means something pulled in the “online formatter” Lambda artifact/module, which you typically don’t want unless you’re deploying that Lambda.

Practical checks/fixes (Gradle):

  1. Run: ./gradlew :yourModule:dependencies (or dependencyInsight) and search for ktfmt / online_formatter.
  2. If you’re using ktfmt just for formatting, use a standard integration like Spotless or the ktfmt Gradle plugin (listed in the README / site). (Android Git Repositories)
  3. Remove/exclude any dependency that is bundling the online formatter JAR (or a shaded JAR that contains that package).

If you paste the Gradle dependency line (or the output of dependencyInsight for ktfmt), I can tell you exactly which dependency is bringing it in and the cleanest exclude rule.

Share this Q&A