Before you exercise your civic duty at the polls on Tuesday, remember to look up your state's rules — specifically where it stands on voting booth selfies.

In some states, a ballot selfie could actually be illegal. So, before you follow in Justin Timberlake's footsteps (or other celebrities and voters for that matter), take a glance at the voting rules in the U.S.

Are you allowed to take a picture inside a voting booth? Here's where each state stands.

STATES, COURTS WRESTLE WITH ALLOWING 'BALLOT SELFIES'

Alabama: No. Each voter in the state has the "right to cast a ballot in secrecy and in private," the Alabama secretary of state says, citing the U.S. Justice Department's advice that ballot selfies don't serve any "useful purpose."

Alaska: No. State law prohibits the "identification of ballots," according to the Alaska Division of Elections.

Arizona: No. The state forbids voters to take any photographs within 75 feet of a polling place. "Any person violating this section is guilty of a class 2 misdemeanor," the law states.

Arkansas: Yes.

California: Yes. The California legislature voted to change the law after the 2016 primary, and it officially went into effect on Jan. 1, 2017. "A voter may now take a photograph of their ballot (a 'ballot selfie') and share it on social media," the memo said. "While 'ballot selfies' are now allowed under California law, elections officials and poll workers will still need to exercise their discretion as to whether 'ballot selfies' cause disruptions requiring a response," California Secretary of State Alex Padilla said in a memo to remind officials of the new policy ahead of the primary election in May 2018.

Colorado: Yes. Governor John Hickenlooper, D-Colo., signed a bill into law in 2017 allowing voters to pose with their ballots. "Any voter may show his or her voted ballot to any other person as long as the disclosure is not undertaken in furtherance of any election violation proscribed in the uniform code," the Colorado General Assembly states.

Connecticut: Yes.

Delaware: Yes. Technically cell phones aren't allowed in voting booths, but there's no specific law against snapping a selfie in private.

District of Columbia: No. "You may not capture any close-up image of a ballot or a voter's selection on the ballot," the D.C. Board of Election states.

Florida: No. It's against the law to snap a selfie with your ballot in the Sunshine State. "Any elector who, except as provided by law, allows his or her ballot to be seen by any person; takes or removes, or attempts to take or remove, any ballot from the polling place before the close of the polls; places any mark on his or her ballot by which it may be identified" will be guilty of a misdemeanor of the first degree, according to a Florida statute.

Georgia: No. It's illegal to take a picture of your ballot — or the booth or other voting equipment for that matter, according to the secretary of state's office.

Hawaii: Yes.

Idaho: Yes.

Illinois: No. Photography is not allowed in any polling place and ""any person who knowingly marks his ballot or casts his vote on a voting machine or voting device so that it can be observed by another person ... shall be guilty of a Class 4 felony," according to WQAD.

Indiana: Yes. You can take a selfie in the voting booth, but you're not allowed to use your photo to persuade other voters in the polling place, Daily Journal reports.

Iowa: No. Only members of the media are allowed to film or photograph voters at the polls, though they also have strict guidelines. "The media may photograph or film activity inside the polling place but cannot take any images of how a voter marks or has marked a ballot. ," the secretary of state's office explains online.

Kansas: Yes. Ballot selfies are legal in Kansas. "There's not a law that prohibits it," elections director Bryan Caskey told KWCH.

Kentucky: Yes.

Louisiana: Yes. However, the ballot can't be marked.

Maine: Yes.

Maryland: No. "You cannot use your cell phone, pager, camera, and computer equipment in an early voting center or at a polling place," Maryland's board of election states online.

Massachusetts: No. Massachusetts law forbids it. “We would prefer that you take your ‘I Voted’ sticker selfie once you have exited the polling station,” said Debra O’Malley, a spokeswoman for Secretary of State William Galvin, told Milford Daily News.

Michigan: No."The use of video cameras, still cameras and other recording devices are prohibited in the polls when they are open for voting," the secretary of state's office says online.

Minnesota: Yes. Voters can take a selfie inside the polling place but they're not allowed to feature a marked ballot in the frame, according to KARE 11.

Mississippi: Yes. You can take a photo but not with a marked ballot.

Missouri: Yes. But you can't snap a photo of a marked ballot.

Montana: Yes.

Nebraska: Yes.

Nevada: No. "Using a mobile telephone or computer within the polling place" is prohibited in the state.

New Hampshire: Yes.

New Jersey: No. Right now New Jersey residents aren't legally allowed to snap a selfie with their ballot, but lawmakers did previously consider a bill to make it legal, NJ.com reports.

New Mexico: Yes.

New York: No. A Manhattan federal judge upheld a decades-old rule prohibiting voters from snapping pictures inside voting booths. “Some voters will require multiple photographs to capture their ballot along with themselves in different poses, or repeated photographs. Long waiting times tend to suppress voter turnout," Judge Castel said, according to the New York Post.

North Carolina: No.

North Dakota: Yes

Ohio: No. Technically, it's illegal to snap a selfie with your ballot, but Cincinatti.com claims the state doesn't really enforce that rule.

Oklahoma: No.

Oregon: Yes.

Pennsylvania: Yes. You're allowed to take a selfie at a polling place but you can't reveal how you voted. The Pennsylvania Department of State suggests taking a photo after you've already left the polling place, PennLive reports.

Rhode Island: Yes. "Photographs of a voter’s own ballot are allowed. General photography is also allowed outside the voter area," according to the Rhode Island Board of Elections.

South Carolina: No. South Carolinians are not allowed to reveal their ballot to anyone else. "The use of cameras is not allowed inside the voting booth," according to the South Carolina Election Commission.

South Dakota: No. Secretary of State Shantel Krebs reminded voters that it's illegal to post your marked ballot on social media.

Tennessee: No, not yet. Justin Timberlake sparked a debate about the legality of sharing a ballot selfie in the state in 2016. Since then, lawmakers have proposed changing the law to allow people to take pictures in voting booths — just not their ballot. The Senate passed the bill in April 2017 but it still needs to be signed into law, according to the Tennessean.

Texas: No. According to Texas' election code, "persons are not allowed to use wireless communications devices within 100 feet of the voting stations. Additionally, persons are not allowed to use mechanical or electronic devices to record sound or images within 100 feet of the voting stations."

Utah: Yes. However, you can't take a picture of a marked ballot or of someone else's ballot — a class C misdemeanor.

Vermont: Yes. It’s “perfectly legal” to take selfies, Secretary of State Jim Condos told KARE 11.

Virginia: Yes.

Washington: Yes.

West Virginia: No. "No voter may enter the booth with any recording or electronic device to interfere with the voting process," per state law.

Wisconsin: Yes.

Wyoming: Yes.