3,4-Methyl​enedioxy​methamphetamine (MDMA), commonly known as ecstasy (E), is a psychoactive drug primarily used as a recreational drug. The desired effects include altered sensations and increased energy, empathy, and pleasure. When taken by mouth, effects begin after 30–45 minutes and last 3–6 hours.

Adverse effects include addiction, memory problems, paranoia, difficulty sleeping, teeth grinding, blurred vision, sweating, and a rapid heartbeat. Deaths have been reported due to increased body temperature and dehydration. Following use people often feel depressed and tired.[14] MDMA acts primarily by increasing the activity of the neurotransmitters serotonin, dopamine, and noradrenaline in parts of the brain.] It belongs to the substituted amphetamine classes of drugs and has stimulant and hallucinogenic effects.

MDMA is illegal in most countries and, as of 2018, has no approved medical uses.] Limited exceptions are sometimes made for research. Researchers are investigating whether MDMA may assist in treating severe, treatment-resistant posttraumatic stress disorder (PTSD) with phase 3 clinical trials to look at effectiveness and safety expected to begin in 2018. In 2017 the FDA granted MDMA a breakthrough therapy designation for PTSD, meaning if studies show promise, a review for potential medical use could occur more quickly.

MDMA was first developed in 1912 by Merck. It was used to improve psychotherapy beginning in the 1970s and became popular as a street drug in the 1980s. MDMA is commonly associated with dance parties, raves, and electronic dance music. It is often sold mixed with other substances such as ephedrine, amphetamine, and methamphetamine. In 2016, about 21 million people between the ages of 15 and 64 used ecstasy (0.3% of the world population). This was broadly similar to the percentage of people who use cocaine or amphetamines, but fewer than for cannabis or opioids. In the United States, as of 2017, about 7% of people have used MDMA at some point in their life and 0.9% have used in the last year.

In general, MDMA users report feeling the onset of subjective effects within 30–60 minutes of MDMA consumption and reaching the peak effect at 75–120 minutes, which then plateaus for about 3.5 hours. The desired short-term psychoactive effects of MDMA have been reported to include:
  • Euphoria – a sense of general well-being and happiness
  • Increased self-confidence, sociability and feelings of communication being easy or simple
  • Entactogenic effects – increased empathy or feelings of closeness with others and oneself
  • Relaxation and reduced anxiety
  • Increased emotionality
  • A sense of inner peace
  • Mild hallucination
  • Enhanced sensation, perception, or sexuality
  • Altered sense of time

The experience elicited by MDMA depends on the dose, setting, and user. The variability of the induced altered state by MDMA is lower compared to other psychedelics. For example, MDMA used at parties is associated with high motor activity, reduced sense of self-identity as well as poor awareness of the background surroundings. Use of MDMA individually or in a small groups in a quiet environment and when concentrating, is associated with increased lucidity, capability of concentration, sensitivity of aesthetic aspects of the background and emotions, as well as greater capability of communication with others. In psychotherapeutic settings MDMA effects have been described by infantile ideas, alternating phases of mood, sometimes memories and moods connected with childhood experiences.

Sometimes MDMA is labelled as an "empathogenic" drug, because of its empathy-producing effects. Results of different studies show its effects of powerful empathy with others. When testing MDMA for medium and high dosage ranges it showed increase on hedonic as well as arousal continuum. The effect of MDMA increasing sociability is consistent, however effects on empathy have been more mixed.

"Molly", short for 'molecule', was recognized as a slang term for crystalline or powder MDMA in the 2000s.