EU AI Act · Transparency · Front-End Duties

An AI regime reaches what your system does, not the form your code takes.

Regulation (EU) 2024/1689 does not contain the word obfuscation, and no reading of it turns a build transformation into a compliance question. What it does reach is what your system is for, what you tell the people using it, and what you can show about a release. Three of those land in the front end. One of them runs directly against the instinct that usually brings teams to a protection tool.

The Short Version

Transforms are neutral · Marking is not a secret · Rebuild your releases

Four findings carry nearly all the practical weight, and only one of them is about the law.

Classification ignores your buildTier follows purpose and context, never the readability of the shipped code.
Provenance markers must be findableA marker a build step destroys has stopped doing the one job it has.
Polymorphic output resists record-keepingA fixed seed and the build manifest turn a release into something you can rebuild.
Why This Page Exists

A law about systems, arriving at a team that ships a bundle

The question reaches engineering in a compressed form, usually as a request to confirm that protecting the front end will not create an AI Act problem, and occasionally as a hope that protecting it will solve one. The first deserves a precise answer. The second is worth addressing head-on, because the most common version of it — that obfuscating the bundle keeps a model integration confidential — is not true and is easy to disprove with the browser's own network panel. What remains after both are settled is a short list of build habits that make the documentation side genuinely easier.

Obligations attach to purpose and context

What the system is used for decides the tier, and the tier decides everything else. No property of the shipped code appears anywhere in that test, so protecting a bundle neither raises nor lowers what you owe.

The interface is where the duties surface

Disclosure and labelling are rendered by the program, and the transformations preserve behaviour, so they preserve the rendering. The thing worth testing is the production artifact, not a development build.

The confidentiality hope fails on the wire

Prompts, endpoints and parameters travel in requests the browser makes. No build setting conceals a request. Moving the call behind your own server does.

Scope

Work out which tier you are in before designing anything around it

The regulation sorts systems by what they are used for, not by industry and not by technology stack. Teams are regularly asked to “make the front end compliant” without being told which tier applies, which is an impossible brief because the tier decides the obligations. Settle it first. The engineering work below is worth doing in every tier, which is why it is safe to start on it while the classification question is still open.

Your interface talks to a person

A chat surface, an assistant panel, a support widget or any feature where a user could reasonably think they are dealing with a human brings a disclosure duty with it. This is the most common route to this page, and the work is almost entirely about what your interface says rather than how your code is built.

Your product generates content

Systems producing synthetic text, images, audio or video carry marking expectations, and marking is only useful if a downstream detector can find it. That makes it a build-integrity question: the marker has to survive bundling, minification and protection, and it has to be applied somewhere an end user cannot simply omit.

Your system is used in a listed high-risk context

Employment decisions, access to essential services, education, credit and similar contexts bring documentation, logging, oversight and quality-management duties. None are discharged by a build tool, but several assume you can reconstruct and describe a released artifact, which is where a protection pipeline genuinely participates.

You supply a component to somebody in a higher tier

You may carry no direct obligation and still be asked to evidence one, because your customer does. Widget, SDK and embedded-component vendors increasingly receive these questions, and the defaults you ship become part of your customer's assessment whether or not you intended that.

The Four Points of Contact

Where an AI regime genuinely meets a JavaScript protection pipeline

Out of the whole regulation, four things are influenced by how you build and protect browser code. Everything else — risk management, data governance, model evaluation, human oversight design, conformity assessment — is decided by what your system does and by the processes around it, and no build setting moves any of it in either direction.

1. Disclosure is rendered by the code you protect

The notice telling somebody they are interacting with an AI system, and the label attached to generated content, are produced by your front end. The transformations do not touch them, because they operate on the program rather than on what the program renders. What does deserve a check is any disclosure that is conditional, fetched or feature-flagged: verify it renders in the production configuration, on the protected artifact, rather than assuming a development build proves it.

2. Marking has to survive the build, and is not a secret

A provenance marker exists to be discovered. That inverts the usual instinct: nothing about it should be concealed, minimised away or placed behind a runtime guard that can suppress it. The stronger design applies marking where content is generated rather than in page script the end user controls, and treats any front-end participation as a convenience that must be verified on a real artifact.

3. Documentation assumes you can rebuild a release

Default output is polymorphic per build, so two runs over the same input differ. That is useful protection and awkward evidence. A fixed seed restores byte-identical rebuilds for the same input and options, and the build manifest records a hash for every source and output file, which together let you tie a shipped bundle back to the tree that produced it.

4. Where your source travels during protection

Protecting code is itself a processing step, and an assessment may ask about it. The hosted service receives the selected JavaScript and deletes the request file after each run; the Windows desktop application and the npm command line both offer a local mode where the source body stays on the device, with only an entitlement check going out. Virtual machine protection is hosted by design.

The Tension Worth Naming

A transparency regime and a hardening instinct point in opposite directions

Leaving this out would make the page a brochure. Protection exists to make a shipped program expensive to read. A transparency regime exists to make certain facts about a system easy to establish. Those are not the same facts, which is why both can be satisfied at once, but the overlap is real and it is better decided deliberately than discovered in an assessment.

The obligations are about facts, not about source

Nobody is entitled to read your bundle. What people are entitled to is a clear statement that they are dealing with an AI system, a detectable marker on generated content, and in higher tiers a documented account of how the system works. All three are satisfiable while the code remains protected.

Concealing the model call gains nothing

Requests are visible in the browser's network panel no matter how the code that issued them was written. Endpoints, parameters and prompt text are all observable. If confidentiality matters, the fix is architectural: put the call behind your own server, which is the same conclusion the API-key question reaches.

Resisting inspection is a posture you may have to defend

Blocking developer-tools keys and treating patched built-ins as tampering are both lawful and both weak controls. They also read badly next to a duty to be transparent about a system's nature. Weigh what they actually prevent against what they signal.

What We Will Not Claim

Four things this product does not do for you

“Obfuscation is an AI Act control”

It is not, in either direction. There is no obligation it discharges and none it breaches. The most that can honestly be said is that the transformations are neutral, and that three build-side habits make the documentation duties easier to meet.

“Protecting the bundle keeps your prompt confidential”

It does not. The prompt travels in a request the user's browser makes, and the network panel shows it. Only moving the call server-side changes that, and it changes it completely.

“This page states your obligations”

It does not, and it is not written by lawyers. Tier, timing, national enforcement and the general-purpose model provisions all need confirming with your counsel against the operative text.

“A build tool can make a system compliant”

No build tool can. Compliance is a property of the system, its purpose, its documentation and its governance. A protector transforms code, which is a small and mostly orthogonal part of that picture.

Frequently Asked

AI regulation and protected JavaScript, answered

Does the EU AI Act require or forbid JavaScript obfuscation?

Neither, and the regulation does not contain the word. It is structured around what an AI system does, who is exposed to it, and what the people responsible for it must disclose, document and oversee. The form of the source code that delivers the interface is not a category the text addresses. There is no obligation you discharge by protecting your bundle and none you breach by doing so. What the Act does reach is the front end in three indirect ways: disclosure has to be rendered, machine-readable marking has to survive your build, and you have to be able to say what a given release contained.

Which parts of the regulation actually touch a browser front end?

Three, and only one of them is about the interface itself. The transparency duties are discharged in the user interface your JavaScript renders, so anything that removes or obscures a notice is a live problem. The marking of artificially generated content has to survive bundling and protection, because a marker that a build step destroys stops being detectable. And the documentation and record-keeping expectations assume you can reconstruct and describe a shipped release, which is a build-reproducibility question rather than a legal one. Everything else in the regulation is decided by what your system does, not by how its code is written.

Does protecting our code change how our system is classified?

It does not. Classification follows the purpose the system is put to and the context it operates in: whether it engages in a prohibited practice, whether it falls into one of the listed high-risk uses, whether it interacts with people in a way that triggers disclosure, or whether it is a general-purpose model with its own obligations. None of those tests reference the readability of the code. A protected front end for a high-risk system carries exactly the obligations an unprotected one does, and a protected front end for a minimal-risk system carries exactly as few.

Can obfuscation be used to keep a feature's AI nature less obvious?

It should not be, and that is the sharpest point on this page because it runs against the instinct that brings people here. The transparency duties exist so that a person can tell they are dealing with an AI system, or that a piece of content was generated. Using a build setting to make that harder to establish is working against the purpose of the rule you are subject to. It is also ineffective, because disclosure obligations are assessed on what the user is shown and told, not on what an engineer could read in your bundle. The transformations are neutral here; the intent behind them would not be.

Where does the transparency notice actually live in a protected build?

In the rendered interface, which is precisely the part the code transformations do not affect. Renaming identifiers, moving string literals into a table, encoding literals, flattening control flow and reordering statements all operate on the program. The notice a user reads is produced by that program at run time and is unchanged by any of them. The practical caution is narrower than people expect: if a disclosure string is fetched, feature-flagged or conditionally rendered, then the thing worth testing is that it still renders in the production configuration, which is a testing habit rather than a protection concern.

What about machine-readable marking of generated content?

Treat it as the opposite of a secret, which is the useful reframing. A provenance marker exists to be found by a downstream detector, so anything that makes it harder to locate is a defect rather than a feature. Two practical consequences follow. Marking that matters should be applied where the content is produced, on the server or at the model boundary, rather than by page script an end user controls. And if front-end code does participate in marking, keep it out of runtime guards that can suppress it, and verify it survives your bundler and your protection step by checking a real production artifact rather than a development build.

How does record-keeping interact with per-build polymorphic output?

By default the engine produces different output for the same input on every run, which is a genuine protection property and an inconvenience for anybody who has to state what a release contained. The resolution is the seed setting: supplying a fixed seed makes the same input, options and seed produce byte-identical output, so a release can be rebuilt and compared rather than merely described. The build manifest complements this by recording a hash of each source file and each output file, which is what lets you tie a shipped artifact back to the inputs that produced it.

Does protecting the bundle hide what our front end sends to a model?

Not in any way that survives inspection, and assuming otherwise is the most common mistake in this area. Anything the browser sends is visible in the network panel regardless of how the code that sent it was written, so endpoints, model identifiers, parameters and prompt text all remain observable. If your front end assembles a system prompt, that prompt is in the bundle and is recoverable from the request even if it were not. The structural fix is the same one that applies to API keys: put the model call behind your own server, where the prompt, the routing and the credentials stay.

Where does our source code go when we protect it?

That depends on which path you use, and it is worth answering precisely because it is a processing question your own assessment may need to cover. The hosted service receives the selected JavaScript, protects it and deletes the request file after the run. The Windows desktop application also offers local processing, where the source body stays on the device, and the npm command line has a local mode with the same property. Those local paths still perform an online entitlement check, which does not carry the source. Virtual machine protection remains hosted by design.

Do the runtime defence options create any friction with these duties?

Two are worth a deliberate look, for reasons that are about posture rather than any specific clause. The developer-tools key blocking option cancels every context-menu event on the page, which is a keyboard accessibility cost as well as a transparency-unfriendly signal, and it prevents very little. The integrity guard watches a list of built-in functions and treats replacement as tampering, which can fire on assistive software and on the browser tooling people use to examine a page. Neither is prohibited. Both are choices you should be able to explain if somebody asks why your interface resists examination.

What is the timeline we should be planning against?

The regulation applies in stages rather than all at once, with the prohibited-practice provisions and the literacy expectations arriving first, the general-purpose model obligations following, and the bulk of the high-risk regime landing later still. Because the staging and the national enforcement arrangements are what determine your actual deadlines, that part belongs with your counsel rather than with an engineering page. What does not change with the timeline is the engineering work described here, which is worth doing on its own merits and is cheap to do early.

What is the shortest useful checklist for a front-end team?

Five items. Confirm with counsel which tier your system falls into, because that decides everything else. Verify that every disclosure and label renders correctly in the protected production artifact, not just in a development build. Move any provenance marking that matters to the server side and confirm the front-end path does not destroy it. Adopt a fixed seed and keep the build manifest so a release can be rebuilt and described. And move the model call, its prompt and its credentials behind your own endpoint, which resolves the confidentiality question that brought most teams to this page in the first place.

Related Guides

Other compliance and evidence guides

GDPR and your JavaScript

What the front end collects, who else executes on the page, and where your source travels when you protect it.

The European Accessibility Act

The same two runtime options examined against an outcomes-based regime, including the keyboard cost of the context-menu block.

Reproducible builds reference

The seed setting and the build manifest, which are what turn a polymorphic output into evidence you can rebuild and compare.

How your source is processed

The precise processing boundary for the hosted service and for the local paths, which is what a vendor assessment asks about.

Digital Services Act

The neighbouring regime, and the other one where a disclosure has to survive your build.

Next Step

Open your production build and check three things

Confirm that every AI disclosure and content label renders in the protected artifact, not just in development. Set a fixed seed and keep the build manifest, so a release can be rebuilt and compared rather than merely described. Then open the network panel on your own front end and look at what the model request actually carries — if that view is uncomfortable, the fix is a server-side endpoint, not a stronger build setting.