---
title: "Comment by Grace Frank on \"Next.js 13 Route Handlers with Typescript\" | Hashnode"
description: "What if I want to use env variables, will I define it differently from the frontend?"
url: "https://hashnode.com/posts/nextjs-13-route-handlers-with-typescript/648f2b23a3d4a7216732ba47/comment/64a2c361fda312e2adb062c7"
---

[Discussion](https://hashnode.com/posts/nextjs-13-route-handlers-with-typescript/648f2b23a3d4a7216732ba47)

Comment [Next.js 13 Route Handlers with Typescript](https://hashnode.com/posts/nextjs-13-route-handlers-with-typescript/648f2b23a3d4a7216732ba47)

[Grace Frank](https://hashnode.com/@gracey)

[Jul 3, 2023](https://hashnode.com/posts/nextjs-13-route-handlers-with-typescript/648f2b23a3d4a7216732ba47/comment/64a2c361fda312e2adb062c7)

What if I want to use env variables, will I define it differently from the frontend?

[Mary Etokwudo](https://hashnode.com/@uniqcoda)

[Jul 3, 2023](https://hashnode.com/posts/nextjs-13-route-handlers-with-typescript/648f2b23a3d4a7216732ba47/comment/64a2c361fda312e2adb062c7#reply-64a3235efc7c5ae54bc25275)

Hi Grace! When you add the prefix `NEXT_PUBLIC_` to your env variables, Next.js will make it available on the browser. For example:

NEXT\_PUBLIC\_GOOGLE\_ANALYTICS\_ID='your\_google\_analytics\_id'

Note that it is not advisable to expose sensitive variables to the browser. Let me know if this works or not :)
